//
//  PersonInfoCell.m
//  Shengzhuli
//
//  Created by FXGuo on 17/3/19.
//  Copyright © 2017年 kamangkeji. All rights reserved.
//

#import "PersonInfoCell.h"
#import <UIImageView+WebCache.h>

@interface PersonInfoCell()

@property (weak, nonatomic) IBOutlet UIImageView *avatorImageView;
@property (weak, nonatomic) IBOutlet UILabel *nickNameLab;
@property (weak, nonatomic) IBOutlet UILabel *desLab;

@property (weak, nonatomic) IBOutlet UILabel *addLab;
@property (weak, nonatomic) IBOutlet UIButton *mycountBtn;



@end

@implementation PersonInfoCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}
- (void)setInfo:(PersonInfo *)info
{
    _info = info;
    self.nickNameLab.text = info.nickName;
    [self.avatorImageView sd_setImageWithURL:[NSURL URLWithString:info.portraitUrl] placeholderImage:GetImage(@"person_avatar")];
    self.desLab.text = [NSString stringWithFormat:@"hi,这是你加入玩转地球的第%zd天",info.registerDate];
    if (info.roleId == 2) {
        self.addLab.text = @"  合伙人  ";
    }else if (info.roleId == 3){
        self.addLab.text = @"  学员  ";
    }else {
        self.addLab.text = @"";
    }
}
- (IBAction)infoBtnClick:(UIButton *)btn
{
    if (self.btnClickBlock) {
        self.btnClickBlock(btn.tag);
    }
}

//- (void)layoutSubviews
//{
//    [super layoutSubviews];
//    self.accessoryView.x -= 30;
//}

@end
